﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UwinEducation.Application.Dtos;
using UwinEducation.Domain.Entities;

namespace UwinEducation.Application.Mappings
{

    public class TeacherAvailabilityProfile : Profile
    {
        public TeacherAvailabilityProfile()
        {
            CreateMap<TeacherAvailability, TeacherAvailabilityDto>()
                .ForMember(dest => dest.TeacherName, opt => opt.MapFrom(src => src.Teacher.Name));

            //CreateMap<RolePermission, RolePermission>();

            CreateMap<CreateTeacherAvailabilityDto, TeacherAvailability>();
            CreateMap<TeacherAvailability, CreateTeacherAvailabilityDto>();

            CreateMap<UpdateTeacherAvailabilityDto, TeacherAvailability>();


            //CreateMap<Role, RoleDto>()
            //.ForMember(dest => dest.Name, opt => opt.MapFrom(src => src.Name));
        }


    }
}
